package com.vcc.service.boss.response.role;


import com.vcc.data.entity.BossRole;
import com.vcc.service.boss.response.baseVo.BossBaseVo;
import com.vcc.service.boss.response.permission.PermissionVoBoss;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Getter
@Setter
public class BossRoleVoBoss extends BossBaseVo implements Serializable {

    private String roleCode;

    private Boolean hasAllData;

    private Boolean hasParamStatus;

    private String roleName;

    private List<PermissionVoBoss> permissionVos;


    public BossRoleVoBoss() {
    }

    public BossRoleVoBoss(BossRole role) {
        super.setId(role.getId());
        super.setCreateDate(role.getCreateDate());
        super.setUpdateDate(role.getUpdateDate());
        this.roleCode = role.getRoleCode();
        this.roleName = role.getRoleName();
        this.hasAllData = role.getHasAllData();
        this.hasParamStatus = role.getHasParamStatus();

    }

    public BossRoleVoBoss(BossRole role, List<PermissionVoBoss> permissionVos) {
        super.setId(role.getId());
        super.setCreateDate(role.getCreateDate());
        super.setUpdateDate(role.getUpdateDate());
        this.roleCode = role.getRoleCode();
        this.hasAllData = role.getHasAllData();
        this.roleName = role.getRoleName();
        this.permissionVos = permissionVos;
        this.hasParamStatus = role.getHasParamStatus();
    }

}
